<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page session="false" %>
<%@ page isELIgnored ="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<script type="text/javascript">
//<![CDATA[
(function(){
	dojo.byId("lbl_sequence_new_code").innerHTML = KppModule.commonResource.code;
	$kdom.appendDojoProp("input_sequence_new_code","missingMessage",$ksub(KppModule.commonResource.missingMessage,[SysAdmin._resource.sequence]));
	$kdom.appendDojoProp("input_sequence_new_code","invalidMessage",SysAdmin._resource.invalidKeyString);
	dojo.byId("lbl_sequence_new_label").innerHTML = KppModule.commonResource.label;
	dojo.byId("lbl_sequence_new_reset").innerHTML = SysAdmin._resource.resetInterval;
	dojo.byId("lbl_sequence_new_reset_nereset").innerHTML = KppModule.commonResource.noRepeat;
	dojo.byId("lbl_sequence_new_reset_day").innerHTML = KppModule.commonResource.day;
	dojo.byId("lbl_sequence_new_reset_month").innerHTML = KppModule.commonResource.month;
	dojo.byId("lbl_sequence_new_reset_year").innerHTML = KppModule.commonResource.year;
	$kdom.appendDojoProp("btn_sequence_new_save","label",KppModule.commonResource.save);
	$kdom.appendDojoProp("btn_sequence_new_cancel","label",KppModule.commonResource.cancel);

})();
//]]>
</script>
<span style="display:none">To solve IE7/8 script event tag problem.</span>
<div data-dojo-type="dijit.form.Form" data-dojo-props="action:'../../config/sequence/new.json',id:'frm_sequence_new'">
	<table width="100%" cellspacing="10">
		<tr>
			<td><label id="lbl_sequence_new_code">sequence code</label></td>
			<td><input id="input_sequence_new_code" data-dojo-type="dijit.form.ValidationTextBox" data-dojo-props="required:true,trim:true,name:'code',maxLength:20,regExp:'[a-zA-Z][a-zA-Z0-9\\-_\\.]*'" style="width:230px;"></input></td>
		</tr>
		<tr>
			<td><label id="lbl_sequence_new_label">sequence label</label></td>
			<td><input id="input_sequence_new_label" data-dojo-type="dijit.form.ValidationTextBox" data-dojo-props="required:true,trim:true,name:'label'" style="width:230px;"></input></td>
		</tr>
		<tr>
			<td><label id="lbl_sequence_new_reset">reset interval</label></td>
			<td>
				<input type="radio" data-dojo-type="dijit/form/RadioButton" name="resetInterval" id="rd_sequence_new_reset_nereset" value="" checked="checked"/>
				<label id="lbl_sequence_new_reset_nereset" for="rd_sequence_new_reset_nereset">never repeat</label>
				<input type="radio" data-dojo-type="dijit/form/RadioButton" name="resetInterval" id="rd_sequence_new_reset_day" value="d"/>
				<label id="lbl_sequence_new_reset_day" for="rd_sequence_new_reset_day">day</label>
				<input type="radio" data-dojo-type="dijit/form/RadioButton" name="resetInterval" id="rd_sequence_new_reset_month" value="m"/>
				<label id="lbl_sequence_new_reset_month" for="rd_sequence_new_reset_month">month</label>
				<input type="radio" data-dojo-type="dijit/form/RadioButton" name="resetInterval" id="rd_sequence_new_reset_year" value="m"/>
				<label id="lbl_sequence_new_reset_year" for="rd_sequence_new_reset_year">year</label>
			</td>
		</tr>
	</table>
</div>
<div class="dialogFooter">
	<div id="btn_sequence_new_save" data-dojo-type="dijit.form.Button" data-dojo-props="iconClass:'dijitEditorIcon dijitEditorIconSave', showLabel:true" style="width:70px;">
		<script type="dojo/on" data-dojo-event="click" data-dojo-args="evt">
			var options = {
				domain:SysAdmin._resource.sequence,
				refresh:Sequence.refresh,
				button:this,
				dialogId:Sequence._dlgSequenceNewId,
				formId:"frm_sequence_new",
				resource:SysAdmin._resource
			};
			KppModule.restProxy(options).postNew();
		</script>
	</div>
	<div id="btn_sequence_new_cancel" data-dojo-type="dijit.form.Button" data-dojo-props="iconClass:'dijitEditorIcon dijitEditorIconUndo', showLabel:true" style="width:70px;">
		<script type="dojo/on" data-dojo-event="click" data-dojo-args="evt">
			dijit.byId(Sequence._dlgSequenceNewId).hide();
		</script>
	</div>
</div>